﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bluyel.Core
{
    /// <summary>
    /// A DataValue typeof PhysQty Length.
    /// </summary>
    public class ValuePhyLength : ValueBase, IValuePhy
    {
        // the value
        double _value;

        // the prefix (multiple)
        TypePhyLengthPrefix _prefix= TypePhyLengthPrefix.Metre;

        // est comparable!  
        // TODO:

        //---------------------------------------------------------------------
        /// <summary>
        /// Constructor.
        /// </summary>
        public ValuePhyLength()
        {
            _value = 0;
        }

        //---------------------------------------------------------------------
        public double Value
        {
            get { return _value; }
            set { _value = value; }
        }

        //---------------------------------------------------------------------
        public TypePhyLengthPrefix Prefix
        { 
            get { return _prefix; }
            set { _prefix = value; }
        }

        //---------------------------------------------------------------------
        public override bool IsEqualsTo(IValue dv)
        {
            // TODO: to implement!
            return false;
        }

        //---------------------------------------------------------------------
        public bool IsEqualsTo(ValuePhyLength dv)
        {
            // TODO: to implement!
            return false;
        }

        //---------------------------------------------------------------------
        /// <summary>
        /// exp: 
        /// PhyLen:12Metre
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            string s = "PhyLen:" + _value + _prefix.ToString();
            return s;
        }

    }
}
